<template>
  <div class="m">
    <Header></Header>
    <img
      src="https://mall.s.maizuo.com/74421c75acc88b15b7f8bdf43c4e9eeb.jpg?x-oss-process=image/quality,Q_70"
      alt=""
    />
    <Mlist :data="new1">
      <h4 slot="biaoti">正在热映</h4>
    </Mlist>
    <div class="xian"></div>
    <Mlist :data="new2">
      <h4 slot="biaoti">即将上映</h4>
    </Mlist>
    <div class="xian"></div>
    <Tt><h4 slot="biaoti">推荐电影</h4></Tt>
  </div>
</template>

<script>
import Mlist from "../components/movie/mlist.vue";
import Tt from "../components/movie/tui.vue";
import Header from "../components/compay/header.vue";
export default {
  components: {
    Mlist,
    Tt,
    Header,
  },
  created() {
    this.$store.dispatch("moviedata", { url: "/goodlift/data" });
  },
  computed: {
    new1() {
      return this.$store.state.newmovie.slice(0, 5);
    },
    new2() {
      return this.$store.state.newmovie.slice(5, 10);
    },
  },
 
};
</script>

<style scoped>
.m img {
  width: 100%;
  height: 2rem;
  margin-top: 0.5rem;
}
.xian {
  width: 100%;
  height: 0.1rem;
  background-color: #eee;
}
</style>